3.7.33 \(\int \log (c (d+\frac {e}{(f+g x)^2})^q) \, dx\) [633]

Optimal. Leaf size=59 \[ \frac {2 \sqrt {e} q \tan ^{-1}\left (\frac {\sqrt {d} (f+g x)}{\sqrt {e}}\right )}{\sqrt {d} g}+\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g} \]

[Out]

(g*x+f)*ln(c*(d+e/(g*x+f)^2)^q)/g+2*q*arctan((g*x+f)*d^(1/2)/e^(1/2))*e^(1/2)/g/d^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2533, 2498, 269, 211} \begin {gather*} \frac {2 \sqrt {e} q \text {ArcTan}\left (\frac {\sqrt {d} (f+g x)}{\sqrt {e}}\right )}{\sqrt {d} g}+\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Log[c*(d + e/(f + g*x)^2)^q],x]

[Out]

(2*Sqrt[e]*q*ArcTan[(Sqrt[d]*(f + g*x))/Sqrt[e]])/(Sqrt[d]*g) + ((f + g*x)*Log[c*(d + e/(f + g*x)^2)^q])/g

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 269

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p, x] /; FreeQ[{a, b, m
, n}, x] && IntegerQ[p] && NegQ[n]

Rule 2498

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)], x_Symbol] :> Simp[x*Log[c*(d + e*x^n)^p], x] - Dist[e*n*p, Int[
x^n/(d + e*x^n), x], x] /; FreeQ[{c, d, e, n, p}, x]

Rule 2533

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*((f_.) + (g_.)*(x_))^(n_))^(p_.)]*(b_.))^(q_.), x_Symbol] :> Dist[1/g, Su
bst[Int[(a + b*Log[c*(d + e*x^n)^p])^q, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && IGtQ[q
, 0] && (EqQ[q, 1] || IntegerQ[n])

Rubi steps

\begin {align*} \int \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right ) \, dx &=\frac {\text {Subst}\left (\int \log \left (c \left (d+\frac {e}{x^2}\right )^q\right ) \, dx,x,f+g x\right )}{g}\\ &=\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g}+\frac {(2 e q) \text {Subst}\left (\int \frac {1}{\left (d+\frac {e}{x^2}\right ) x^2} \, dx,x,f+g x\right )}{g}\\ &=\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g}+\frac {(2 e q) \text {Subst}\left (\int \frac {1}{e+d x^2} \, dx,x,f+g x\right )}{g}\\ &=\frac {2 \sqrt {e} q \tan ^{-1}\left (\frac {\sqrt {d} (f+g x)}{\sqrt {e}}\right )}{\sqrt {d} g}+\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 61, normalized size = 1.03 \begin {gather*} -\frac {2 \sqrt {e} q \tan ^{-1}\left (\frac {\sqrt {e}}{\sqrt {d} (f+g x)}\right )}{\sqrt {d} g}+\frac {(f+g x) \log \left (c \left (d+\frac {e}{(f+g x)^2}\right )^q\right )}{g} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Log[c*(d + e/(f + g*x)^2)^q],x]

[Out]

(-2*Sqrt[e]*q*ArcTan[Sqrt[e]/(Sqrt[d]*(f + g*x))])/(Sqrt[d]*g) + ((f + g*x)*Log[c*(d + e/(f + g*x)^2)^q])/g

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(128\) vs. \(2(51)=102\).
time = 0.13, size = 129, normalized size = 2.19

method result size
default \(\ln \left (c \left (\frac {d \,g^{2} x^{2}+2 d f g x +d \,f^{2}+e}{\left (g x +f \right )^{2}}\right )^{q}\right ) x +2 e g q \left (\frac {\frac {f \ln \left (d \,g^{2} x^{2}+2 d f g x +d \,f^{2}+e \right )}{2 g}+\frac {e \arctan \left (\frac {2 d \,g^{2} x +2 d f g}{2 g \sqrt {e d}}\right )}{g \sqrt {e d}}}{e g}-\frac {f \ln \left (g x +f \right )}{g^{2} e}\right )\) \(129\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(ln(c*(d+e/(g*x+f)^2)^q),x,method=_RETURNVERBOSE)

[Out]

ln(c*((d*g^2*x^2+2*d*f*g*x+d*f^2+e)/(g*x+f)^2)^q)*x+2*e*g*q*(1/e/g*(1/2*f/g*ln(d*g^2*x^2+2*d*f*g*x+d*f^2+e)+e/
g/(e*d)^(1/2)*arctan(1/2*(2*d*g^2*x+2*d*f*g)/g/(e*d)^(1/2)))-1/g^2/e*f*ln(g*x+f))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (50) = 100\).
time = 0.55, size = 101, normalized size = 1.71 \begin {gather*} g q {\left (\frac {f e^{\left (-1\right )} \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right )}{g^{2}} - \frac {2 \, f e^{\left (-1\right )} \log \left (g x + f\right )}{g^{2}} + \frac {2 \, \arctan \left (\frac {{\left (d g^{2} x + d f g\right )} e^{\left (-\frac {1}{2}\right )}}{\sqrt {d} g}\right ) e^{\left (-\frac {1}{2}\right )}}{\sqrt {d} g^{2}}\right )} e + x \log \left (c {\left (d + \frac {e}{{\left (g x + f\right )}^{2}}\right )}^{q}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f)^2)^q),x, algorithm="maxima")

[Out]

g*q*(f*e^(-1)*log(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)/g^2 - 2*f*e^(-1)*log(g*x + f)/g^2 + 2*arctan((d*g^2*x + d
*f*g)*e^(-1/2)/(sqrt(d)*g))*e^(-1/2)/(sqrt(d)*g^2))*e + x*log(c*(d + e/(g*x + f)^2)^q)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 115 vs. \(2 (50) = 100\).
time = 0.40, size = 288, normalized size = 4.88 \begin {gather*} \left [\frac {g q x \log \left (\frac {d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}{g^{2} x^{2} + 2 \, f g x + f^{2}}\right ) + f q \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - 2 \, f q \log \left (g x + f\right ) + g x \log \left (c\right ) + q \sqrt {-\frac {e}{d}} \log \left (\frac {d g^{2} x^{2} + 2 \, d f g x + d f^{2} + 2 \, {\left (d g x + d f\right )} \sqrt {-\frac {e}{d}} - e}{d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}\right )}{g}, \frac {g q x \log \left (\frac {d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e}{g^{2} x^{2} + 2 \, f g x + f^{2}}\right ) + f q \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - 2 \, f q \log \left (g x + f\right ) + g x \log \left (c\right ) + \frac {2 \, q \arctan \left (\frac {{\left (d g x + d f\right )} e^{\left (-\frac {1}{2}\right )}}{\sqrt {d}}\right ) e^{\frac {1}{2}}}{\sqrt {d}}}{g}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f)^2)^q),x, algorithm="fricas")

[Out]

[(g*q*x*log((d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)/(g^2*x^2 + 2*f*g*x + f^2)) + f*q*log(d*g^2*x^2 + 2*d*f*g*x + d
*f^2 + e) - 2*f*q*log(g*x + f) + g*x*log(c) + q*sqrt(-e/d)*log((d*g^2*x^2 + 2*d*f*g*x + d*f^2 + 2*(d*g*x + d*f
)*sqrt(-e/d) - e)/(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)))/g, (g*q*x*log((d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)/(g^2
*x^2 + 2*f*g*x + f^2)) + f*q*log(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e) - 2*f*q*log(g*x + f) + g*x*log(c) + 2*q*ar
ctan((d*g*x + d*f)*e^(-1/2)/sqrt(d))*e^(1/2)/sqrt(d))/g]

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(ln(c*(d+e/(g*x+f)**2)**q),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 137 vs. \(2 (50) = 100\).
time = 4.18, size = 137, normalized size = 2.32 \begin {gather*} d g^{4} q {\left (\frac {f e^{\left (-1\right )} \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right )}{d g^{5}} - \frac {2 \, f e^{\left (-1\right )} \log \left ({\left | g x + f \right |}\right )}{d g^{5}} + \frac {2 \, \arctan \left (\frac {{\left (d g x + d f\right )} e^{\left (-\frac {1}{2}\right )}}{\sqrt {d}}\right ) e^{\left (-\frac {1}{2}\right )}}{d^{\frac {3}{2}} g^{5}}\right )} e + q x \log \left (d g^{2} x^{2} + 2 \, d f g x + d f^{2} + e\right ) - q x \log \left (g^{2} x^{2} + 2 \, f g x + f^{2}\right ) + x \log \left (c\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(log(c*(d+e/(g*x+f)^2)^q),x, algorithm="giac")

[Out]

d*g^4*q*(f*e^(-1)*log(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e)/(d*g^5) - 2*f*e^(-1)*log(abs(g*x + f))/(d*g^5) + 2*ar
ctan((d*g*x + d*f)*e^(-1/2)/sqrt(d))*e^(-1/2)/(d^(3/2)*g^5))*e + q*x*log(d*g^2*x^2 + 2*d*f*g*x + d*f^2 + e) -
q*x*log(g^2*x^2 + 2*f*g*x + f^2) + x*log(c)

________________________________________________________________________________________

Mupad [B]
time = 0.52, size = 163, normalized size = 2.76 \begin {gather*} x\,\ln \left (c\,{\left (d+\frac {e}{{\left (f+g\,x\right )}^2}\right )}^q\right )-\frac {2\,f\,q\,\ln \left (f+g\,x\right )}{g}+\frac {\ln \left (e\,\sqrt {-d\,e}-3\,d\,f^2\,\sqrt {-d\,e}+4\,d\,e\,f+d\,e\,g\,x-3\,d\,f\,g\,x\,\sqrt {-d\,e}\right )\,\left (q\,\sqrt {-d\,e}+d\,f\,q\right )}{d\,g}-\frac {\ln \left (3\,d\,f^2\,\sqrt {-d\,e}-e\,\sqrt {-d\,e}+4\,d\,e\,f+d\,e\,g\,x+3\,d\,f\,g\,x\,\sqrt {-d\,e}\right )\,\left (q\,\sqrt {-d\,e}-d\,f\,q\right )}{d\,g} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(log(c*(d + e/(f + g*x)^2)^q),x)

[Out]

x*log(c*(d + e/(f + g*x)^2)^q) - (2*f*q*log(f + g*x))/g + (log(e*(-d*e)^(1/2) - 3*d*f^2*(-d*e)^(1/2) + 4*d*e*f
 + d*e*g*x - 3*d*f*g*x*(-d*e)^(1/2))*(q*(-d*e)^(1/2) + d*f*q))/(d*g) - (log(3*d*f^2*(-d*e)^(1/2) - e*(-d*e)^(1
/2) + 4*d*e*f + d*e*g*x + 3*d*f*g*x*(-d*e)^(1/2))*(q*(-d*e)^(1/2) - d*f*q))/(d*g)

________________________________________________________________________________________